package com.alnex.bank2.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.alnex.bank2.service.AccountInfoService;


@RestController
public class Bank2Controller {

	@Autowired
    AccountInfoService accountInfoService;

    @RequestMapping(value = "/transfer/{amount}", method = RequestMethod.GET)
    public Boolean transfer(@PathVariable("amount") Double amount) {
    	this.accountInfoService.updateAccountBalance("2", amount);
        return true;
    }
	   
}
